const path = require("path");
const Help = require("./help.js");
const fs = require("fs");
async function  main(){

  



  let dom_3band_dir="W:/0926aaa/result"
  let dom_savedir="W:/0926aaa/clip"
  let tifs=Help.Get_Deep_Files(dom_3band_dir,[".tif"],false)
  let cmd_file="W:/0926aaa/clip.txt"
  let lines=[]
  for (let i = 0; i < tifs?.length; i++) {
    let one_tif = tifs[i];
    let one_tif_file = one_tif?.file;
    let out_tif=`${dom_savedir}/${path.basename(one_tif_file)}`
    let one_line=`${one_tif_file}\t113.179167580556 44.0226928833333 113.281415963889 44.0606789694446\t${out_tif}\tW:\\0926aaa\\0926\\bbb\\0926mj.shp\t256\ttrue\tfalse`
    lines.push(one_line)
  }
  let all_line_string=lines.join("\r\n")
  fs.writeFileSync(cmd_file,all_line_string,{
    encoding:"utf-8"
  })
  return true
}
main().then(()=>{
  console.log(`done...`)
})



